package com.example.timfinprototypeback.controller;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.example.timfinprototypeback.entity.senti;
import com.example.timfinprototypeback.entity.stock;
import com.example.timfinprototypeback.service.sentiService;
import com.example.timfinprototypeback.service.stockService;
import com.example.timfinprototypeback.service.stockServiceImpl;
import com.example.timfinprototypeback.utils.netManger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.spring.web.json.Json;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

@RestController
@RequestMapping("/senti")
public class sentiController {
    @Autowired
    private sentiService mySentiService;
    private netManger myNet = new netManger();


    @RequestMapping(value = "/sentiment", method = RequestMethod.GET, produces = MediaType.IMAGE_PNG_VALUE)
    public byte[] predict(@RequestBody(required = false) JSONObject info) {
        senti mySenti;
        String queryDate= new String("");

        try {
            return myNet.TransRun();
        } catch (Exception e1) {}

        return null;
    }
}
